/**
 * @Author: 耿立强
 * @Date: 2019/6/20
 * @Last Modified by: 杨光宇
 * @Last Modified time: 2021-02-08 13:22:51
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 批量活动执行情况查询 列表查询
export const getMaExecuteCondition = params => axios.get(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpMa/getMaExecuteCondition`, { params });
//车辆列表接口
export const getCondition = params => axios.get(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpMa/getCondition/${params.id}`);

// 查询所有品牌
export const getAllBrand = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/BasicParametersAfterSales/queryById/brandsqueryall`, {
    params
  });
// export const getAllBrand = params => axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/queryBrandDictAll`);

//  查询所有车系
export const getAllSeries = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/camel/series`, {
    params
  });
//  查询所有车型
export const getAllModel = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}//baseData/basicData/camel/model`, {
    params
  });

// 查询所有车系
//export const getAllSeries = params => axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/brandsdict/2/seriessdictAll`);

// 查询所有车型
//export const getAllModel = params => axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/brandsdict/1/seriessdictAll/2/modelsdictAll`);

//  table车型
export const getCheModelSelectTable = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/camel/model`, {
    params
  });

//列表导出
export const exportMaExecuteCondition = params => {
  return axios({
    url: `${SERVER.DMSCLOUD_ACTIVITY}/ttRpMa/exportMaExecuteCondition`,
    method: 'get',
    params: params,
    responseType: 'blob'
  });
};
//下载中心导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
export const getSeriesModelBrand = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/repair/getSeriesModelBrand`, {
    params
  });
